Supplement for “ Bayesian Hypothesis Testing for Single - Subject Designs ”
نویسنده
چکیده
This document provides example R code demonstrating how to use the BayesSingleSub package (Section 1), and the technical details for the sampling routines (Section 2). 1 Tutorial for computing de Vries and Morey's Bayes factors Here, we show how to compute the Bayes factors B ar , B trend , B int , and B t+i , and how to obtain and plot the posterior distributions of the model parameters. First, download the R statistical environment from http://cran.r-project.org/ and install the BayesSingleSub package using the R command: install.packages("BayesSingleSub") Then, load the BayesSingleSub package with the library() function: library(BayesSingleSub) For the purposes of this demonstration, we compute the Bayes factors for the data shown in Figure 1 of the manuscript. We first define the data and the number of observations in the pre-and post-treatment phases: For convenience, we divide the data before and after the intervention into separate vectors: ypre = data[1:n1] ypost = data[n1 + 1:n2] The logarithm of the JZS+AR Bayes factor B ar can be obtained by using the ttest.Gibbs.AR() function, and the logarithm of the TAR Bayes factors B int , B trend , and B i+t by using the trendtest.Gibbs.AR() function:
منابع مشابه
Bayesian Fuzzy Hypothesis Testing with Imprecise Prior Distribution
This paper considers the testing of fuzzy hypotheses on the basis of a Bayesian approach. For this, using a notion of prior distribution with interval or fuzzy-valued parameters, we extend a concept of posterior probability of a fuzzy hypothesis. Some of its properties are also put into investigation. The feasibility and effectiveness of the proposed methods are also cla...
متن کاملBayesian average error-based approach to sample size calculations for hypothesis testing.
Under the classical statistical framework, sample size calculations for a hypothesis test of interest maintain prespecified type I and type II error rates. These methods often suffer from several practical limitations. We propose a framework for hypothesis testing and sample size determination using Bayesian average errors. We consider rejecting the null hypothesis, in favor of the alternative,...
متن کاملBayesian Sample size Determination for Longitudinal Studies with Continuous Response using Marginal Models
Introduction Longitudinal study designs are common in a lot of scientific researches, especially in medical, social and economic sciences. The reason is that longitudinal studies allow researchers to measure changes of each individual over time and often have higher statistical power than cross-sectional studies. Choosing an appropriate sample size is a crucial step in a successful study. A st...
متن کاملBayesian designs of phase II oncology trials to select maximum effective dose assuming monotonic dose-response relationship
BACKGROUND For many molecularly targeted agents, the probability of response may be assumed to either increase or increase and then plateau in the tested dose range. Therefore, identifying the maximum effective dose, defined as the lowest dose that achieves a pre-specified target response and beyond which improvement in the response is unlikely, becomes increasingly important. Recently, a class...
متن کاملComparison between Frequentist Test and Bayesian Test to Variance Normal in the Presence of Nuisance Parameter: One-sided and Two-sided Hypothesis
This article is concerned with the comparison P-value and Bayesian measure for the variance of Normal distribution with mean as nuisance paramete. Firstly, the P-value of null hypothesis is compared with the posterior probability when we used a fixed prior distribution and the sample size increases. In second stage the P-value is compared with the lower bound of posterior probability when the ...
متن کامل